const actions = {
	add({commit},personObj){
		commit('ADD',personObj)
	}
}

const mutations = {
	ADD(state,personObj){
		state.list.unshift(personObj)
	}
}

const state = {
	list:[
		{id:'001',name:'张三'}
	]
}

const getters = {
	total(state){
		return state.list.length
	}
}

export default {
	namespaced:true,
	actions,
	mutations,
	state,
	getters
}